/*
               File: DPMenu
        Description: DPMenu
             Author: GeneXus C# Generator version 10_1_5-40140
       Generated on: 2/22/2011 13:17:19.7
       Program type: Callable routine
          Main DBMS: sqlserver
*/
using System;
using System.Collections;
using GeneXus.Utils;
using GeneXus.Resources;
using GeneXus.Application;
using GeneXus.Metadata;
using GeneXus.Data;
using com.genexus;
using GeneXus.Data.ADO;
using GeneXus.Data.NTier;
using GeneXus.Data.NTier.ADO;
using System.Runtime.Remoting;
using GeneXus.WebControls;
using GeneXus.Http;
using GeneXus.Procedure;
using GeneXus.XML;
using GeneXus.Search;
using GeneXus.Encryption;
using GeneXus.Http.Client;
using System.Threading;
using System.Xml.Serialization;
using System.Data.SqlTypes;
namespace GeneXus.Programs {
   public class dpmenu : GXProcedure
   {
      public dpmenu( )
      {
         context = new GxContext(  );
         DataStoreUtil.LoadDataStores( context);
         IsMain = true;
      }

      public dpmenu( IGxContext context )
      {
         this.context = context;
         IsMain = false;
      }

      public void release( )
      {
      }

      public void execute( out IGxCollection aP0_Gxm2rootcol )
      {
         this.Gxm2rootcol = new GxObjectCollection( context, "MenuData.MenuDataItem", "Tutoria", "SdtMenuData_MenuDataItem", "GeneXus.Programs") ;
         initialize();
         executePrivate();
         aP0_Gxm2rootcol=this.Gxm2rootcol;
      }

      public IGxCollection executeUdp( )
      {
         this.Gxm2rootcol = new GxObjectCollection( context, "MenuData.MenuDataItem", "Tutoria", "SdtMenuData_MenuDataItem", "GeneXus.Programs") ;
         initialize();
         executePrivate();
         aP0_Gxm2rootcol=this.Gxm2rootcol;
         return Gxm2rootcol ;
      }

      public void executeSubmit( out IGxCollection aP0_Gxm2rootcol )
      {
         dpmenu objdpmenu;
         objdpmenu = new dpmenu();
         objdpmenu.Gxm2rootcol = new GxObjectCollection( context, "MenuData.MenuDataItem", "Tutoria", "SdtMenuData_MenuDataItem", "GeneXus.Programs") ;
         objdpmenu.initialize();
         ThreadPool.QueueUserWorkItem( new WaitCallback( objdpmenu.executePrivateCatch ));
         aP0_Gxm2rootcol=this.Gxm2rootcol;
      }

      void executePrivateCatch( object stateInfo )
      {
         try
         {
            executePrivate();
         }
         catch ( Exception e )
         {
            GXUtil.SaveToEventLog( "Design", e);
            throw e ;
         }
      }

      void executePrivate( )
      {
         /* GeneXus formulas */
         /* Output device settings */
         Gxm1menudata = new SdtMenuData_MenuDataItem(context) ;
         Gxm2rootcol.Add(Gxm1menudata, 0);
         Gxm1menudata.gxTpr_Menuid = 1 ;
         Gxm1menudata.gxTpr_Menutitle = "PRINCIPAL" ;
         Gxm1menudata.gxTpr_Menudescription = "PRINCIPAL" ;
         Gxm1menudata.gxTpr_Menuurl = "wpprincipal.aspx" ;
         Gxm1menudata = new SdtMenuData_MenuDataItem(context) ;
         Gxm2rootcol.Add(Gxm1menudata, 0);
         Gxm1menudata.gxTpr_Menuid = 1 ;
         Gxm1menudata.gxTpr_Menutitle = "PROFESORES" ;
         Gxm1menudata.gxTpr_Menudescription = "PROFESORES" ;
         Gxm1menudata.gxTpr_Menuurl = "wwprofesor.aspx" ;
         Gxm1menudata = new SdtMenuData_MenuDataItem(context) ;
         Gxm2rootcol.Add(Gxm1menudata, 0);
         Gxm1menudata.gxTpr_Menuid = 2 ;
         Gxm1menudata.gxTpr_Menutitle = "ALUMNO" ;
         Gxm1menudata.gxTpr_Menudescription = "ALUMNO" ;
         Gxm1menudata.gxTpr_Menuurl = "wwalumno.aspx" ;
         Gxm1menudata = new SdtMenuData_MenuDataItem(context) ;
         Gxm2rootcol.Add(Gxm1menudata, 0);
         Gxm1menudata.gxTpr_Menuid = 3 ;
         Gxm1menudata.gxTpr_Menutitle = "CURSOS" ;
         Gxm1menudata.gxTpr_Menudescription = "CURSOS" ;
         Gxm1menudata.gxTpr_Menuurl = "wwcurso.aspx" ;
         Gxm1menudata = new SdtMenuData_MenuDataItem(context) ;
         Gxm2rootcol.Add(Gxm1menudata, 0);
         Gxm1menudata.gxTpr_Menuid = 4 ;
         Gxm1menudata.gxTpr_Menutitle = "MATERIAS" ;
         Gxm1menudata.gxTpr_Menudescription = "MATERIAS" ;
         Gxm1menudata.gxTpr_Menuurl = "wwmateria.aspx" ;
         this.cleanup();
      }

      protected void cleanup( )
      {
         CloseOpenCursors();
         if ( IsMain )
         {
            context.CloseConnections() ;
         }
         exitApplication();
      }

      protected void CloseOpenCursors( )
      {
      }

      public override void initialize( )
      {
         Gxm1menudata = new SdtMenuData_MenuDataItem(context);
         /* GeneXus formulas. */
         context.Gx_err = 0 ;
      }

      private IGxCollection aP0_Gxm2rootcol ;
      [ObjectCollection(ItemType=typeof( SdtMenuData_MenuDataItem ))]
      private IGxCollection Gxm2rootcol ;
      private SdtMenuData_MenuDataItem Gxm1menudata ;
   }

}
